package com.itheima.String.method;

import java.util.Scanner;

/**
 * @Author 王加鑫
 * @Date 2021/4/27 15:41
 * @Version 1.0
 */
public class ForStringTest02 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入一个字符串:");
        String s = sc.nextLine();
        char[] chars = s.toCharArray();
        int smallCount = 0;
        int bigCount = 0;
        int numCount = 0;
        for (int i = 0; i < chars.length; i++) {
            if(chars[i] >= 'a' && chars[i] <= 'z'){
                smallCount++;
            }else if(chars[i] >= 'A' && chars[i] <= 'Z'){
                bigCount++;
            }else if(chars[i] >= '0' && chars[i] <= '9'){
                numCount++;
            }
        }

        System.out.println(smallCount);
        System.out.println(bigCount);
        System.out.println(numCount);


    }
}
